import 'reflect-metadata'
import './src/types'
import { InversifyExpressServer } from 'inversify-express-utils'
import { Container } from 'inversify'
import { AppContainerInj } from './src/app.containerInj'
import { AppConfig } from './src/app.config'
import { globalErrProcMidd } from './src/middleware/global.errProc.midd'

const container = new Container()
new AppContainerInj(container)

const server = new InversifyExpressServer(container)
new AppConfig(container, server)
const app = server.build()

app.use(globalErrProcMidd)
app.listen(7400, () => {
  console.log('Server is running on port 7400')
})